﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;

namespace DotNetNinjaLibrary.TestApplication
{
	public class UniteTemplateSelector : DataTemplateSelector
	{
		public DataTemplate UnitTemplate { get; set; }
		public DataTemplate HeroTemplate { get; set; }

		public override DataTemplate SelectTemplate(object item, DependencyObject container)
		{
			if (item is Hero)
				return this.HeroTemplate;

			if (item is Unit)
				return this.UnitTemplate;

			return base.SelectTemplate(item, container);
		}
	}
}
